@extends('layout.index')
@section('title','后台用户修改')
@section('content')

	<div class="mws-panel grid_8">
                	<div class="mws-panel-header">
                    	<span>用户修改</span>
                    </div>
                    <div class="mws-panel-body no-padding">
                    	<form action="/admin/user/update" method="post" class="mws-form">
                    	@if (count($errors) > 0)
                    	<div class="mws-form-message error">
                    		<ul>
                    			@foreach ($errors->all() as $error)
                    			<li>{{ $error }}</li>
                    			@endforeach
                    		</ul>
                    	</div>
                    	@endif
                    		<div class="mws-form-inline">
                    			<div class="mws-form-row">
                    				<label class="mws-form-label">用户名称</label>
                    				<div class="mws-form-item">
                    					<input type="text" value="{{$userinfo->username}}" name="username" class="small">
                    				</div>
                    			</div>

                                   <div class="mws-form-inline">
                                   <div class="mws-form-row">
                                        <label class="mws-form-label">用户状态</label>
                                        <div class="mws-form-item">
                                             <select name="state" id="">
                                                  <option value="0"
                                                  @if(!empty($userinfo->state) && $userinfo->state == 0)
                                                  selected
                                                  @endif
                                                  >未知</option>
                                                  <option value="1"
                                                  @if(!empty($userinfo->state) && $userinfo->state == 1)
                                                  selected
                                                  @endif
                                                  >激活</option>
                                                  <option value="2"
                                                  @if(!empty($userinfo->state) && $userinfo->state == 2)
                                                  selected
                                                  @endif
                                                  >未激活</option>
                                             </select>
                                        </div>
                                   </div>

                                   <div class="mws-form-inline">
                    			<div class="mws-form-row">
                    				<label class="mws-form-label">邮箱</label>
                    				<div class="mws-form-item">
                    					<input type="text" value="{{$userinfo->email}}" name="email" class="small">
                    				</div>
                    			</div>
                                   <input type="hidden" name="id" value="{{$userinfo->id}}">
									{{csrf_field()}}
                    		</div>
                    		<div class="mws-button-row">
                    			<input type="submit" class="btn btn-danger" value="提交">
                    			<input type="reset" class="btn " value="重置">
                    		</div>
                    	</form>
                      </div>
                      </div>   
                    </div>    	
                </div>
@endsection